import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus';
import 'element-plus/lib/theme-chalk/index.css';
import './assets/css/common.css';
import VueAxios from 'vue-axios'
import axios from 'axios'
import './assets/css/reset.css'
import './assets/icon/iconfont.css'
import 'dayjs/locale/zh-cn'
import locale from 'element-plus/lib/locale/lang/zh-cn'

// createApp(App).use(ElementPlus).use(router).mount('#app')
axios.interceptors.request.use(config => {
    console.log(config);
    config.headers.token = window.sessionStorage.getItem('success_token')
    return config
})


const app = createApp(App)
// app.use(locale)
app.use(ElementPlus,{locale})
app.use(router)
app.use(VueAxios, axios)
app.mount('#app')
